package cn.felord.verse.configure;

import cn.felord.common.excel.ValidatedExcelReader;
import jakarta.validation.Validator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;



/**
 * The type Easy excel configuration.
 *
 * @author dax
 * @since 2022 /2/5 11:02
 */
@Configuration(proxyBeanMethods = false)
public class EasyExcelConfiguration {

    /**
     * Excel reader excel reader.
     *
     * @param validator the validator
     * @return the excel reader
     */
    @Bean
    public ValidatedExcelReader excelReader(Validator validator){
        return new ValidatedExcelReader(validator);
    }
}
